import os
import requests
#
# print (help ('modules'))
#获取当前文件路径
print (os.getcwd ())
#
# print (os.curdir )
# print (os.pardir)
# path = os.pardir+'/day 12/a.txt'
print (os.name) #操作系统 nt  苹果 darwin
# print (os.listdir ())
# os.mkdir(r'd:/d01\c01')
# os.remove('d:/d01/aaa.txt')
# os.remove(r'd:/d01\c01\log.txt')
# os.rmdir(r'd:/d01\c01')
"../day 12/a.txt"
r_path = os.path.abspath("../day 12/a.txt")
print (os.path.isabs ("../day 12/a.txt"))
print (os.path.split (r_path)[1])
print (os.path.join ('d:/d1', 'log.txt'))
print (os.path.exists ('d:\d01'))

if os.path.exists('d:/d01'):
    with open('d:/d01/log.txt',mode='w',encoding='utf-8') as f:
        f.write('我创建的日志文件按')
